﻿#load "Helpers.fs" "Interfaces.fs" "Core.fs" "Classes.fs" "FsFlow.fs"

open FsFlow

let aa = Flow.var 1

let bExt = ref 2 
let bb = Flow.prop (fun () -> !bExt) (fun v -> bExt := v)

let apb =
    comp {
        let! a = aa
        let! b = bb
        return a + b
    }

printfn "%d" !apb // 3

bb := 3

printfn "%d" !apb // 4

let s1 = Flow.set (set [1; 2; 3])
let s2 = Flow.set (set [2; 3; 4])

let si = Flow.intersect s1 s2

